2005-01-13 Matthias Clasen <mclasen@redhat.com>
+ * configure.in: Check for nl_langinfo()
+ * gtk/gtkcalendar.c: (gtk_calendar_init): Use nl_langinfo() when it's
+ available to determine first day of week (#163842, Vincent Untz)
+
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Add hints about
the lifecycle of widgets. (#159503, Christian Persch)
2005-01-13 Matthias Clasen <mclasen@redhat.com>
+ * configure.in: Check for nl_langinfo()
+ * gtk/gtkcalendar.c: (gtk_calendar_init): Use nl_langinfo() when it's
+ available to determine first day of week (#163842, Vincent Untz)
+
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Add hints about
the lifecycle of widgets. (#159503, Christian Persch)
2005-01-13 Matthias Clasen <mclasen@redhat.com>
+ * configure.in: Check for nl_langinfo()
+ * gtk/gtkcalendar.c: (gtk_calendar_init): Use nl_langinfo() when it's
+ available to determine first day of week (#163842, Vincent Untz)
+
* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Add hints about
the lifecycle of widgets. (#159503, Christian Persch)
fi
AC_SUBST(REBUILD)
-AC_CHECK_FUNCS(lstat mkstemp flockfile)
+AC_CHECK_FUNCS(lstat mkstemp flockfile nl_langinfo)
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
AC_MSG_CHECKING(for sigsetjmp)
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
+#ifdef HAVE_NL_LANGINFO
+#include <langinfo.h>
+#endif
#include <string.h>
#include <stdlib.h>
#include <time.h>
else if (strcmp (year_before, "calendar:MY") != 0)
g_warning ("Whoever translated calendar:MY did so wrongly.\n");
+#if defined (HAVE_NL_LANGINFO) && defined (_NL_TIME_FIRST_WEEKDAY)
+ week_start = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
+ private_data->week_start = *((unsigned char *) week_start) % 7;
+#else
/* Translate to calendar:week_start:0 if you want Sunday to be the
* first day of the week to calendar:week_start:1 if you want Monday
* to be the first day of the week, and so on.
g_warning ("Whoever translated calendar:week_start:0 did so wrongly.\n");
private_data->week_start = 0;
}
+#endif
}
GtkWidget*